#!/bin/bash

if [[ "$PLATFORM_PLUG" =~ "kf5" ]]; then
    set -- "${SNAP}/kf5/snap/command-chain/desktop-launch" "$@"
    # shellcheck source=/dev/null
    source "${SNAP}/snap/command-chain/run"
elif [[ "$PLATFORM_PLUG" =~ "qt6" ]]; then
    set -- "${SNAP}/qt6/snap/command-chain/desktop-launch6" "$@"
    # shellcheck source=/dev/null
    source "${SNAP}/snap/command-chain/run"
else
    set -- "${SNAP}/kf6/snap/command-chain/desktop-launch6" "$@"
    # shellcheck source=/dev/null
    source "${SNAP}/snap/command-chain/run"
fi
